package com.woniuxy.rdbc.service.imp;

import com.woniuxy.rdbc.dto.UserDto;
import com.woniuxy.rdbc.entity.SysUser;
import com.woniuxy.rdbc.mapper.SysUserMapper;
import com.woniuxy.rdbc.service.UserService;
import com.woniuxy.rdbc.vo.UserVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Resource
    private SysUserMapper sysUserMapper;
    @Override
    public int deleteByPrimaryKey(Long id) {
        return sysUserMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(SysUser record) {
        return 0;
    }

    @Override
    public int insertSelective(SysUser record) {
        return sysUserMapper.insertSelective(record);
    }

    @Override
    public SysUser selectByPrimaryKey(Long id) {
        return sysUserMapper.selectByPrimaryKey(id);
    }

    @Override
    public SysUser SelectByTelAndPsw(UserDto userDto) {
        return sysUserMapper.SelectByTelAndPsw(userDto);
    }

    @Override
    public int updateByPrimaryKeySelective(SysUser record) {
        return sysUserMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(SysUser record) {
        return 0;
    }

    @Override
    public List<UserVo> selectByLike(UserDto userDto) {
        return sysUserMapper.selectByLike( userDto);
    }

    @Override
    public SysUser selectByTel(String tel) {
        return sysUserMapper.selectByTel(tel);
    }
}
